home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
dev
/
gui
/
muibuilderv11.lha
/
muibuilder
/
mb
/
e
/
Mac2E.lha
/
Mac2E
/
Sources
/
doMethod.e
next >
Wrap
Text File
|
1994-01-29
|
714b
|
22 lines
/* This procedure was given to me by Wouter van Oortmerssen, the Amiga E author.
It replaces the DoMethod() function (included in the amiga.lib library) for E users. */
PROC doMethod( obj:PTR TO object, msg:PTR TO msg )
DEF h:PTR TO hook, o:PTR TO object, dispatcher
IF obj
o := obj-SIZEOF object /* instance data is to negative offset */
h := o.class
dispatcher := h.entry /* get dispatcher from hook in iclass */
MOVEA.L h,A0
MOVEA.L msg,A1
MOVEA.L obj,A2 /* probably should use CallHookPkt, but the */
MOVEA.L dispatcher,A3 /* original code (DoMethodA()) doesn't. */
JSR (A3) /* call classDispatcher() */
MOVE.L D0,o
RETURN o
ENDIF
ENDPROC NIL